package com.baidu.treadCommunication;

public class Application {
    public static void main(String[] args) {
        //1.创建共用的账户对象
        Account account = new Account("110", 0);

        //2.创建3个线程用于存钱
        new SaveMoneyThread("亲爹", account, 100).start();
        new SaveMoneyThread("干爹", account, 100).start();
        new SaveMoneyThread("岳父", account, 100).start();

        //3.创建2个线程用于取钱
        new DrawMoneyThread("小红", account, 100).start();
        new DrawMoneyThread("小黑", account, 100).start();

    }
}
